package com.pubinfo.passbook.common.service.ruler;

import com.pubinfo.passbook.common.model.ruler.PayInformation;
import com.pubinfo.passbook.common.model.ruler.PersonInformation;
import org.dom4j.DocumentException;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Service
public interface InformationService {
  PayInformation GetInformationFromPassbook(String id) throws DocumentException;
  
  List<PayInformation> listInformationFromPassbook(List<String> ids);
  
  PayInformation informationFromPassbook(List<String> ids);
  
  BigDecimal getPassbookSum(List<String> ids);
  
  PersonInformation GetPersonInformationFrom4A(String acct);
  
  /**
   * 根据票据id获取票据的某类自费总金额
   *
   * @param passbookId 票据id
   * @param types      项目类型可有多个
   */
  BigDecimal getSumAmountSelfByType(String passbookId, Map<String, BigDecimal> types);
  
  /**
   * 获取诊查费
   *
   * @param passbookId
   * @return
   */
  BigDecimal getAmountByCostName(String passbookId);

  /**
   * 计算诊查费金额
   * @param passbookId
   * @return
   */
  BigDecimal getAmountByCostNameNew(String passbookId);

  /**
   * 根据详情单计算自理费用
   * @param payInformation
   * @return
   */
  BigDecimal calculationSelfpaymentCare(PayInformation payInformation);


  /**
   * 根据详情单计算自费费用
   * @param payInformation
   * @return
   */
  BigDecimal calculationSelfpaymentCost(PayInformation payInformation);

}
